class BookModel {
  String? bookId;
  String? title;
  String? subTitle;
  String? updatetime;
  String? bookImgUrl;
  bool? ischeck = false;
  double? rating;
  String? desc;

  BookModel(this.bookId,
      {this.title,
      this.subTitle = '',
      this.updatetime = '',
      this.bookImgUrl = '',
      this.ischeck = false,
      this.rating = 2.0,
      this.desc});

  BookModel.fromJson(Map<String, dynamic> json) {
    bookId = json['bookId'];
    title = json['title'];
    subTitle = json['subTitle'];
    updatetime = json['updatetime'];
    bookImgUrl = json['bookImgUrl'];
    ischeck = json['ischeck'];
    rating = json['rating'];
    desc = json['desc'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['bookId'] = this.bookId;
    data['title'] = this.title;
    data['subTitle'] = this.subTitle;
    data['updatetime'] = this.updatetime;
    data['imagbookImgUrles'] = this.bookImgUrl;
    data['ischeck'] = this.ischeck;
    data['rating'] = this.rating;
    data['desc'] = this.desc;
    return data;
  }
}
